public class Main {
    public static void main(String[] args) {
        int a = (int) 0.3;
        int b = (int) -0.3;
        System.out.println(a); // 0
        System.out.println(b); // 0

        int a1 = (int) (0.5+0.5);
        int b1 = (int) (-0.5+0.5);
        System.out.println(a1); // 1
        System.out.println(b1); // 0
    }
}
